package com.aos.erp.schools.service.student.imp;

import com.aos.erp.schools.mapper.student.CoachStudentMapper;
import com.aos.erp.schools.model.student.CoachStudent;
import com.aos.erp.schools.service.student.CoachStudentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @Auther: chb
 * @Date: 2018/11/2 14:48
 * @Description: 培训科目教练分配学员
 */
@Service
public class CoachStudentServiceImpl  extends ServiceImpl<CoachStudentMapper, CoachStudent> implements CoachStudentService{


    @Override
    public void saveBean(CoachStudent coachStudent) throws Exception {
        coachStudent.setCreated(new Date());
        coachStudent.setUpdated(new Date());

        this.save(coachStudent);
    }

    @Override
    public void updateBean(CoachStudent coachStudent) {
        baseMapper.update(coachStudent);
    }

}
